package com.owc.common.sdk.request;

import com.owc.common.sdk.AbstractRequest;
import com.owc.common.sdk.response.WalletResponse;
import org.apache.http.entity.ContentType;

import java.util.Map;

/**
 * 生成钱包地址
 */
public class GetWalletRequest extends AbstractRequest implements Request<WalletResponse> {
    @Override
    public String getApiUrl() {
        return super.getBaseUrl() + "/wallet/getWallet";
    }

    @Override
    public Class<WalletResponse> getResponseClass() {
        return WalletResponse.class;
    }

    @Override
    public Object getUrlParams() {
        setUrlParamsMap(super.urlParamsMap);
        return super.urlParamsMap;
    }


    @Override
    public String getMethod() {
        return super.method;
    }

    /**
     *要生成的钱包类型（例如，AMT，ETH，BTC，ETG，CZDT等 - 仅支持与LiannetSys 签订的合同中启用的类型）
     */
    private String type;

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Override
    protected void setUrlParamsMap(Map<String, Object> map) {
        map.put("type",this.type);
    }

    @Override
    public ContentType getContentType() {
        return super.getContentType();
    }
}
